When authoring code in any given software language, it is often helpful for the author to be presented with a list of options for valid references (called “available symbol set”) that could be inserted at a particular arbitrary point in the code. Such lists are referred to as “completion lists” as they often assist the author with a list of possible choices for completing a valid expression.
Software languages may be categorized as “dynamic languages” or “static languages”. A fundamental characteristic of dynamic languages is that they lack a type system. Thus, the generation of complete and accurate completion lists at arbitrary points in code for dynamic languages is a difficult problem for several reasons. Most significantly, the lack of a type system makes it difficult or impossible to resolve the type of a variable at a specific point in code by means of techniques used by language services written for strongly-typed languages such as C#.
For strong-typed languages, code editors can construct a rich code model based on supporting metadata and/or static analysis of source. For dynamic languages, the most reliable information regarding a variable type is available at runtime. It is difficult, however, to reliably execute code outside of the actual application, web site, or other runtime context. For example, it is difficult to guarantee that execution will halt at a specific point of interest to allow for the analysis to occur at that point in the processing. Furthermore, it is difficult to contrive a set of valid inputs to a specific code segment (e.g., a routine). Past implementations have used such techniques as altering the dynamic language interpreter in order to solve some of these issues.